package com.llf.Mapper;

import com.llf.Pojo.Bill;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface BillMapper {
    /**
     * 根据供应商Id查询订单数量
     * @param providerId
     * @return
     */
    //根据供应商Id查询订单数量
    public int getBillCountByProviderId(@Param("providerId") Integer providerId);


    /**
     * //增加订单
     * @param bill
     * @return
     */
    public int addBill(Bill bill);

    /**
     * 通过查询条件获取供应商列表-getBillList

     * @param
     * @param
     * @return
     * @throws Exception
     */
    //通过查询条件获取供应商列表-getBillList
    public List<Bill> getBillList(@Param("productName") String productName,
                                  @Param("providerId") Integer providerId,
                                   @Param("isPayment") Integer isPayment);

    //通过条件查询，查询供货商数量,模糊查询
    public int getBillCount(Bill bill);

    //通过delId删除Bill
    public int deleteBillById(@Param("id") Integer id);

    //通过billId获取Bill
    public Bill getBillById(@Param("id") Integer id);

    //修改订单信息
    public int updateBill(Bill bill);

    //根据供应商Id删除订单信息
    public int deleteBillByProviderId(@Param("providerId") Integer providerId);


}
